package cn.tianyigps.tianyigpspublic.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.geo.GeoJsonPoint;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexed;

import java.util.Date;
import java.util.Map;

/**
 * Created with IDEA
 * author:guibin.cui
 * Date:2018/4/23
 * Time:16:09
 */
@Setter
@Getter
public class EquipmentModel {

    //唯一标识
    @Id
    private String id;
    //起始位，用来区分属于哪种设备
    private String startBit;
    //设备id
    private String equipmentId;
    //激活时间
    private Date activeTime;
    //数据上传时间(信号时间)
    private Date reportTime;
    //持续时间
    private Integer duration;
    //定位时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private Date locateTime;
    //Gps经度
    private Double gpsLongitude;
    //Gps纬度
    private Double gpsLatitude;
    //车辆速度
    private Double speed;
    //设备状态
    private String lineStatus;
    //停车时间点
    private Date lineStatusTime;
    //基站的CellID(此数据是设备登录时上传的基站包数据)
    private String cellId;
    //基站的lac
    private String lac;
    //清洗更新时间
    private Date cleanTime;
    //Geo 定位
    @GeoSpatialIndexed
    @JsonIgnore
    private GeoJsonPoint point;
    //设备类型(TCP或者UDP)
    private String equipmentType;
    //数据包的定位类型（00：gps定位 01：基站定位 02：wifi定位）
    private String locationType;
    //电源类型：有线 无线
    private String powerType;
    //航向
    private String heading;
    //当前设备的所处的工作模式
    private Map<String,Object> workPattern;
    //设备
    private String voltage;
    //acc 点火 00熄火  01 点火
    private String acc;
    //总公里数
    private Double kms;
    //ICCID
    private String iccid;
    //vin
    private String vin;
    //历史数据标识 1 补全 0 实时
    private String rtr;
    //扩展字段
    private Map<String,Object> extend;
}
